﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ImageProcessing.DataEntryDialogs
{
    public partial class BrightnessDialog : Form
    {
        Dimentions dimentions;
        public BrightnessDialog(ref Dimentions dim)
        {
            InitializeComponent();
            dimentions = dim;
        }

        private void btnBrightness_Click(object sender, EventArgs e)
        {
            if (this.txtOffset.Text != string.Empty)
            {
                dimentions.Value = int.Parse(this.txtOffset.Text);
                this.Close();
            }
            else
            {
                MessageBox.Show("Please fill in required fields.");
            }
        }
    }
}
